//
//  DrawLiveEcg.h
//  Ikinloop-demo
//
//  Created by Li Shen on 2021/4/22.
//  Copyright © 2021 lyh. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface DrawLiveEcg : NSObject

//采样率
@property (nonatomic, assign) CGFloat sampleRate;
//走纸速度
@property (nonatomic, assign) CGFloat ecgSpeed;
//增益
@property (nonatomic, assign) CGFloat ecgGain;
//波形图颜色
@property (nonatomic, strong) UIColor *ecgColor;
//画布宽度
@property (nonatomic, assign) CGFloat lineWidth;

- (instancetype)initWithLayer:(CALayer*)layer;
- (instancetype)initWithLayer:(CALayer*)layer context:(CGContextRef)context;

- (void)reset;
//实时画
- (void)drawWaveByRepeat:(int)ecgdata;

//画一屏幕
- (void)drawWaveFullScreen:(NSArray*)ecgdatas;
@end

NS_ASSUME_NONNULL_END
